# coding=utf-8
import arcpy
path = r'D:\WorkData\20250712四川河流\0813处理';
arcpy.env.workspace = path
arcpy.env.overwriteOutput = True
spatial_ref = arcpy.SpatialReference(4326)
shp = r'D:\WorkData\20250712四川河流\0813处理\rivs.shp'.decode('utf-8')
rivNameList = []
i = 0
with arcpy.da.SearchCursor(shp, ['SHAPE@','name','rivId']) as cursor:
    for row in cursor:
        if row[2] not in rivNameList:
            rivNameList.append(row[2])
        else:
            print  i,row[1],row[2],row[0].length
            i += 1
